import { IExplore, IExportFactory, IExploreContainer } from './explore.defind';
export class ExploreContainer implements IExploreContainer{
    public activeName: string;
    public activeIdx: number;
    public activeExp: IExplore;
    public explores: IExplore[] = [];
    constructor(private exploreFct: IExportFactory) {

    }
    public async addExplores() {
        this.explores.push(await this.exploreFct().init());
    }
    public setActive(idx: number) {
        this.activeIdx = idx;
        this.activeName = this.explores[idx].name;
        this.activeExp = this.explores[idx];
    }
    public removeExp(idx: number) {
        this.explores.splice(idx, 1);
    }
}